package com.kmb.provider.service.fallback;

import com.kmb.provider.domain.SfKmUser;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.File;
import java.util.List;

/**
 * 用户服务提供者熔断器
 * <p>
 * Description:
 * </p>
 *
 * @see com.kmb.provider.service.fallback
 */
@Slf4j
public class RemoteLogServiceFallback {

    private static final Logger logger = LoggerFactory.getLogger(RemoteLogServiceFallback.class);

    /**
     * 熔断方法
     *
     * @param username {@code String} 用户名
     * @param ex       {@code Throwable} 异常信息
     * @return {@link SfKmUser} 熔断后的固定结果
     */
    public static SfKmUser saveLogFallback(String username, Throwable ex) {
        logger.warn("Invoke 插入日志失败: " + ex.getClass().getTypeName());
        return null;
    }
}
